package com.top.vueservice.service.impl;

import com.top.vueservice.dao.ProductDao;
import com.top.vueservice.entities.Params;
import com.top.vueservice.entities.Product;
import com.top.vueservice.service.ProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {
    @Resource
    private ProductDao productDao;

    @Override
    public Product getProById(Long lId) {
        return productDao.getProById(lId);
    }

    @Override
    public Integer addPro(Product product) {
        return productDao.addPro(product);
    }

    @Override
    public List<Product> getAll() {
        return productDao.getAll();
    }

    @Override
    public List<Product> getAllByPage(Params params) {
        return productDao.getAllByPage(params);
    }

    @Override
    public Integer getTotalCount(Params params) {
        return productDao.getTotalCount(params);
    }

    @Override
    public Integer updateProById(Product product) {
        return productDao.updateProById(product);
    }

    @Override
    public Integer delProById(Product product) {
        return productDao.delProById(product);
    }
}
